const Layout = () => import('@/layout/Index.vue')
const Users = () => import('@/views/users/Index.vue')
const Edit = () => import('@/views/users/Edit.vue')
export default [
  {
    path: '/users',
    component: Layout,
    name: 'users',
    meta: {
      title: '用户列表',
    },
    roles: ['admin', 'visitor'],
    icon: 'users',
    children: [
      {
        path: '',
        name: 'usersList',
        component: Users,
        meta: {
          title: '用户列表',
          roles: ['admin', 'visitor'],
        },
      },
      {
        path: 'edit/:id',
        name: 'userEdit',
        component: Edit,
        meta: {
          title: '编辑用户',
          roles: ['admin'],
        },
        hidden: true, // 不在菜单中显示
      },
    ],
  },
]